package test;

public class Coordinate {
	int x;
	int y;

	public Coordinate(String c){
		String[] a = c.split(",");
		x = Integer.parseInt(a[0]);
		y = Integer.parseInt(a[1]);
	}
	
	public Coordinate(int x, int y){
		this.x = x;
		this.y = y;
	}
	
	public int getX() {
		return x;
	}
	
	public int getY() {
		return y;
	}
	
	@Override
	public String toString() {
		return "("+x+","+y+")";
	}
	
}
